1. Bounded Contexts
- CRM Context
Owns people and organizations: Contact, Company, relationship links, communication preferences, addresses, consent, and referral entry points. - Listings and Demand Context
Owns supply and demand: Activity (marketed instruction/listing), Requirement (client demand), matching, and pipeline visibility. - Transactions Context
Owns negotiation and agreement state: Offer, deal progression fields, contractual milestones, and party roles around a deal. - Tenancy and Property Management Context
Owns occupancy lifecycle: Tenancy, tenancy parties, lease hierarchy (head/sub), progression and management data. - Asset and Geography Context
Owns real estate structure: Asset base type, Property, Portfolio, Address, floors/areas, and asset-level metadata. - Organization and Security Context
Owns operational structure and access projection: User, Department, Business, roles, security attributes, negotiation ownership. - Integration and Async Processing Context
Owns background jobs and external systems: DocuSign, Dotmailer, SAP, Thirdfort, notifications, feeds, Elasticsearch updates, and sync/error handling.
2. Major Aggregates Per Context
- CRM
- Contact aggregate, Company aggregate, Contact-Company association, Contact relationship graph, address associations.
- Listings and Demand
- Activity aggregate, Requirement aggregate, Match aggregate linking them, negotiator/department ownership.
- Transactions
- Offer aggregate with role-based parties (applicant, broker, lender, surveyor, etc.) and status progression.
- Tenancy and PM
- Tenancy aggregate with linked asset/activity/requirement, tenancy parties, reviews/breaks, lease lineage.
- Asset and Geography
- Asset aggregate root with Property/Portfolio specializations and shared address model.
- Organization and Security
- User aggregate, department/business membership, role bindings, resource-security attributes.
- Integration and Async
- WebJob handlers as process/application layer components that mutate domain aggregates and publish side effects.
3. Relationship Backbone (most important)
- Asset to Activity: one-to-many
- Asset to Tenancy: one-to-many
- Requirement to Activity: many-to-many via Match
- Activity to Offer: one-to-many
- Requirement to Offer: one-to-many
- Tenancy to Asset: many-to-one
- Contact to Company: many-to-many via association entity
- Contact to Address and Company to Address: association-based (not direct single owner)
- User to Department/Business: many-to-one from user perspective
4. Typical Business Flow
- Lead captured against Contact and optionally Company
- Requirement created (demand)
- Activity created on an Asset (supply)
- Match links demand to supply
- Offer tracks negotiation
- Accepted/completed progression produces Tenancy
- WebJobs synchronize, notify, enrich, and index
5. Integration Points (high-value)
- Document and signing workflows (DocuSign)
- Marketing/communications sync (Dotmailer, notifications, SMS/email jobs)
- External data/compliance updates (SAP, Thirdfort, Fixflo and others)
- Search indexing and feed jobs (Elasticsearch and feed webjobs)
6. Practical Implications for Change Design
- Changes to party roles should be made in party subtypes, not by adding fixed role columns.
- Cross-context changes usually pass through Activity, Requirement, Offer, and Tenancy in that order.
- Async side effects belong in WebJobs/process handlers; core invariants should remain in domain/application logic.
- Security and visibility are cross-cutting and should be treated as first-class when modifying aggregates.